home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 355 < prev    next >
Internet Message Format  |  1996-08-06  |  753b

  1. Path: bignews.shef.ac.uk!usenet
  2. From: D.G.Williamson@shef.ac.uk (Daniel Williamson)
  3. Newsgroups: comp.std.c
  4. Subject: random floating point!
  5. Date: 22 Feb 1996 14:32:53 GMT
  6. Organization: Electrical Eng, University of Sheffield , UK
  7. Message-ID: <4ghuql$80h@bignews.shef.ac.uk>
  8. NNTP-Posting-Host: pc021048.shef.ac.uk
  9. Mime-Version: 1.0
  10. Content-Type: Text/Plain; charset=US-ASCII
  11. X-Newsreader: WinVN 0.99.7
  12.  
  13. Does anybody know how to generate a random floating point number. I am using 
  14. top speed c, for the work and the rand() function ad defined in the ansi 
  15. standard only goes up to 32767. I suppose I could multiply it, but I'm looking 
  16. for a more elegant solution to give me the full range of +ve and -ve values.
  17. Thanks for any help you can offer.
  18. Daniel
  19.  
  20.